#include <stdio.h>
#include <string.h>
int main()
{
    char *s = "192.168.10.165";

    char*start = s;// 指向字符串起点位置

    while(1)
    {
        char*p = strstr(start, ".");
        if(p == NULL)
        {
            printf("%s\n", start);
            break;
        }    
        //printf("p = %s\n", p);
        int i = 0;
        while(start+i != p)
        {
            printf("%c", *(start+i));
            i++;
        }
        printf("\n");
        
        start = p+1;
    }
   
   

}